home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
program
/
ezmouse2.zip
/
EZMOUSE.Q&A
< prev
next >
Wrap
Text File
|
1996-05-11
|
4KB
|
78 lines
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* COMMON QUESTIONS AND ANSWERS FOR EZ-MOUSE 1.0 *
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Question: I just installed the mouse, but I don't see any cursor on the
screen!
Answer: You need to call the procedure ShowMouse.
Question: How can I tell if a button or buttons is/are being held down?
Answer: Make a call to ButtonPress, and pass it either LEFT_BUTTON, or
RIGHT_BUTTON, depending on what button you need info on.
Question: In graphics mode, the computer seems to freeze. What the heck's
wrong with your program?!?!?
Answer: It isn't freezing. In text mode, when you first call InstallMouse,
you see text displayed on the screen. However, in graphics mode
you don't see any text. You just get the 12 second delay. So wait
12 seconds, and the mouse will be installed and the computer will
"unfreeze".
Question: After waiting 12 seconds for InstallMouse, the entire screen changes
color! What gives?
Answer: This may or may not happen. The solution would be to call
InstallMouse at the beginning of your code, then clear the screen to
remove the color.
Question: I still don't understand what's up with this MouseType enumeration
thing. Help me!
Answer: An enumeration is this: when you declare an enum (as they are called),
you call it as such: AN_ENUM = (VAL0, VAL1, VAL2, VAL3, VAL4...).
VAL0 is equal to 0, VAL1=1, VAL2=2, etc. However, there is no value 0
for MouseType. It's called UNDEF. Don't worry about it.
So in your code, you could make decisions such as:
IF MouseType=PS2 then.....
instead of writing:
IF MouseType=4
It's just an easier way to identify what type of mouse it is.
Question: I don't understand the ChangeCursor procedure, can you help me?
Answer: Yes. First of all, you have to create a mouse cursor, using an
editor (see the file EZMOUSE.DOC for info on where to get them).
The editor will save the data in a file. You then need to cut and
paste that data into your actual program. The data will be an array
of hexadecimal values. The array is usually named MyCursor (why
am I talking in short, choppy sentences?). Now, you need to declare
2 variables, I suggest ArrayOffset and ArraySegment, and declare them
as type word. Example: ArrayOffset, ArraySegment : Word;
You also need to know the horizontal and vertical hotspots of the
cursor. To help you understand these terms, I'll give you an example:
the normal mouse cursor, the arrow, has a hotspot located at the very
tip of it. When you click on something, you have to position the
cursor so that the TIP actually is on the area you want to click on.
That's the hotspot, the area of the cursor that's used to click with.
Now, how do we find the offset and segment? Just use the following
code (assuming you kept the variables names the same, and that the
name of your mouse cursor array is MyCursor):
ArrayOffset:=Ofs(MyCursor);
ArraySegment:=Seg(MyCursor);
Pretty easy (I hope). Now, you just need to cal ChangeCursor.
Once again, assuming you kept the variable names the same, call it
like this:
ChangeCursor(ArrayOffset, ArraySegment, hhs, vhs);
NOTE: hhs is the horizontal hotspot (substitute in a number here)
and vhs is the vertical hotspot. That's it, you now have a new
cursor! If you STILL are stuck, I'll be nice and let you contact
me for help, even though only registered users are allowed to do so.
NOTE: You may ONLY ask for help on this topic if you are an
UNREGISTERED user. You can send me a letter (see address in
REGISTER.TXT), or (preferred), send me email to:
psilocyn@ix.netcom.com